package uk.co.cocking.getinline2.pipeline.transformers;

import java.util.List;

import uk.co.cocking.getinline2.record.Record;

public class FieldExtractor extends AbstractTransformer<Record, String> {
	
	private final String fieldName;


	public FieldExtractor(String fieldName) {
		this.fieldName = fieldName;
	}

	@Override
	public List<String> transform(Record record) {
		return enlist(record.getString(fieldName));
	}

}
